package com.ssi.report.common.utils;

/** 
 * 
 * 	Developed By 	: Kroekpong Sakulchai
 *  Date 			: 09-MAY-2014
 *  Version 		: Alpha
 *  Team			: Software Solution And Integration
 *   
 * **/

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class SSPropertiesUtils {

	public static String getProperties(String prefix, String in) {
		Properties prop = new Properties();
		InputStream input = null;
		StringBuilder sbPrefix = new StringBuilder("");
		String label = null;
		try {
            
			sbPrefix.append(prefix);
			sbPrefix.append(".properties");
			input = SSPropertiesUtils.class.getClassLoader().getResourceAsStream(sbPrefix.toString());
			prop.load(input);
			label = prop.getProperty(in);

		} catch (IOException e) {
			e.printStackTrace();
		}

		return label;
	}

}
